<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/default/layout}">

<head>
    <title>文章列表 | [[${#servletContext.getAttribute('configMap')['blog_name']}]]</title>
</head>
<body>
<div layout:fragment="content">
    <!-- 图片 -->
    <div class="image-banner" style="color: #fff">
        <div class="image-content" th:if="${#strings.startsWith(currentNav.cover,'http') == true}"><img th:data-original="@{${currentNav.cover}}" class="lazy"></div>
        <div class="image-content" th:if="${#strings.startsWith(currentNav.cover,'http') == false}"><img th:data-original="@{${prefix} + '/source/images/postList.png'}" class="lazy"></div>
        <div class="descr">
            <a th:href="@{/}">首页  /  </a>
            <a th:href="@{'/' + ${link} + '/'}">[[${type}]]  /  </a>
            <a href="javascript:void(0)">[[${name}]]</a></div>
        <div class="title">[[${type}]]相关</div>
    </div>

    <div class="ml-content">
        <div class="ml-content-body">
            <div class="archive-body" id="archives">
                <div th:if="${pageInfo.total > 0}">
                    <div class='archive-content'th:each="post,iterStat : ${pageInfo.list}">
                        <div class="archives">
                            <div class="animate-box archives-item" data-animate-effect="fadeInUp">
                                <a th:href="@{'/'+${post.link}}" style="display: block">
                                    <span class="time"><b>[[${post.year} + '-' + ${post.month} + '-' + ${post.day}]]</b></span>
                                    <span class="title">[[${post.title}]]</span>
                                    <span class="pull-right hidden-xs">([[${post.readNum}]])</span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class='archive-title' th:if="${pageInfo.total == 0}">
                    <div style="text-align:center;">
                        ~~找不到数据~~
                    </div>
                </div>
            </div>
        </div>
        <nav class="pagination-bar">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="prev page-numbers" th:href="@{${pageInfo.pageNum-1} == 1 ? '/' + ${link} + '/' + ${name} + '/': '/' + ${link} + '/' + ${name} + '/page/' + ${pageInfo.pageNum-1}+'/'}" ><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
            <span th:if="${pageNum == pageInfo.pageNum}">
                <a href="javascript:void(0)" th:text="${pageNum}" class="page-numbers current"></a>
            </span>
            <span th:if="${pageNum != pageInfo.pageNum}">
                <a th:href="@{${pageNum} == 1 ? '/' + ${link} + '/' + ${name} + '/': '/' + ${link} + '/' + ${name} + '/page/' + ${pageNum}+'/'}" th:text="${pageNum}" class="page-numbers hidden-xs"></a>
            </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="next page-numbers" th:href="@{'/' + ${link} + '/' + ${name} + '/page/' +  ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>

    </div>
</div>
</body>
</html>